<template>
	<view class="container">
		<view class="dialog" v-show="show">
			<view class="top">
				<text @click="closeDialog">X</text>
			</view>
			<view class="con">
				内容
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				href: 'https://uniapp.dcloud.io/component/README?id=uniui',
				show: true
			}
		},
		methods: {
			saoyisao() {
				// 调用相机扫一扫
				uni.scanCode({
					success: resp => {
						resp.result // 扫出来的内容
					}
				})
			},
			closeDialog() {
				this.show = false
			}
		},
		onLoad() {
			setTimeout(() => {
				this.show = false
			}, 5000)
		}
	}
</script>

<style>
	.dialog {
		position: fixed;
		left: 0;
		top: 0;
		background-color: rgba(0, 0, 0, .7);
		width: 100%;
		height: 100%;
	}
</style>